home *** CD-ROM | disk | FTP | other *** search
-
- #include <exec/libraries.h>
- #include <pragma/exec_lib.h>
- #include <stdio.h>
-
- #include "lib.h"
- #include "lib_protos.h"
- #include "test.h"
-
- struct LibBase *TestBase;
-
- void main()
- {
- if (TestBase = (struct LibBase *) OpenLibrary("test.library",1))
- {
- printf("1 + 2 = %ld\n",AddTwo(1,2));
- printf("last_result = %ld\n",TestBase->last_result);
- CloseLibrary((struct Library *) TestBase);
- }
- else
- {
- printf("unable to open \"test.library\".");
- };
- }
-